<!--
 * @Descripttion:
 * @Copyright: 武汉一一零七科技有限公司©版权所有
 * @Link: 1074699502@qq.com
 * @Contact: QQ:1074699502
 * @LastEditors: wzb
 * @LastEditTime: 2020-10-21 22:46:06
-->
<template>
<div class="goodsList">
<block v-for="(item,index) in list" :key="index">
	<goodsCard :info="item" class="goodsCard">
		  <template v-slot:goodsTag>
			<u-tag :text="tagList[item.leixing]" mode="plain" type="error" size="mini" />
			<u-tag text="live"  mode="plain" type="info" size="mini" />
		  </template>
	</goodsCard>
</block>

      <u-empty v-if="list.length===0"  :src="STATICURL+'images/nullStatus/noList.png'" icon-size="300" text="暂无数据"></u-empty>

</div>
</template>

<script>
import goodsCard from '@/components/goodsCard' //商品组件
export default {
    name: "goodsList",
    props: {
        list: {
            type: Array,
            required: true,
            default: () => {
                []
            }
        }
    },
  computed:{
      tagList(){
        return [
            '自营',
            '秒杀',
            '团购',
            '拼团',
        ]
      }
  },
    components: {
        goodsCard
    }
}
</script>

<style lang="scss" scoped>

.goodsList {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 15upx;
    background-color: #f5f5f5;


}

.goodsCard{
	width: 49%;
}

.demo-warter {
  border-radius: 8px;
  margin: 5px;
  background-color: #ffffff;
  position: relative;
  padding-bottom: 10upx;
}

</style>
